/*
 * ResidueCM.h
 *
 *  Created on: Sep 21, 2011
 *      Author: marchi
 */

#ifndef RESIDUECM_H_
#define RESIDUECM_H_
#include <vector>
#include "Atoms.h"
#include "typedefs.h"
#include <string>
using std::string;

using std::vector;
class ResidueCM:public Atoms {
protected:
	static int nr;
	static vector<int> * ind;
	static string * label;
	void Allocate(int);
public:
	ResidueCM();
	ResidueCM(int, vector<int> *, string *);
	ResidueCM(int n) {nr=n; ind=new vector<int> [nr];x=new rvec [nr];}
	ResidueCM(rvec *);
	virtual ~ResidueCM();
	void Allocate();
	ResidueCM & operator()(rvec *);
	ResidueCM & operator()(int );
	ResidueCM & operator()(ResidueCM &);
	ResidueCM & operator()(int, vector<int> *, string *);
	ResidueCM & operator=(float);
	ResidueCM & operator=(ResidueCM &);
	ResidueCM & operator+=(ResidueCM &);
	ResidueCM operator+(ResidueCM &);
	vector<int> & getind(int i){return ind[i];}
	void setlabels();
	string & getlabels(int i){return label[i];};
	int getNR(){return nr;};
	int Size(){return nr;};
	void SetCM(rvec *);
};

#endif /* RESIDUECM_H_ */
